﻿@model List<Movies>

@if (Model != null)
{
    <div style="margin-left:20px;">
        @foreach (Movies movie in Model)
        {
            if (movie != null && movie.Files != null)
            {
                    <a href='@String.Format("http://{0}/movie/{1}/details",Request.Url.Host,movie.MovieGuid)' title="@movie.MovieTitle"><img class="cover" src='@String.Format("http://{0}/Uploads/{1}", Request.Url.Host, movie.Files.FileUrl)' alt="cover" /></a>
            }
            else
            {
                    <a href='@String.Format("http://{0}/movie/{1}/details", Request.Url.Host, movie.MovieGuid)' title="@movie.MovieTitle"><img class="cover" src='@String.Format("http://{0}/Uploads/movie_unknown.jpg", Request.Url.Host)' alt="cover" /></a>
            }
        }
    </div>
}